@extends('default.layouts.adminPublic')
@section('title', '添加角色')

@section('content')
<!--导航开始-->
<div class="crumb_warp">
    <i class="fa fa-home"></i> <a href="{{url('admin')}}">首页</a> &raquo; 角色管理
</div>
<!--导航结束-->

<!--结果集标题与导航组件 开始-->
<div class="result_wrap">
    <div class="result_title">
        <h3>添加角色</h3>
        @if(count($errors)>0)
            <div class="mark">
                @if(is_object($errors))
                    @foreach($errors->all() as $error)
                        <p>{{$error}}</p>
                    @endforeach
                @else
                    <p>{{$errors}}</p>
                @endif
            </div>
        @endif
    </div>
    <div class="result_content">
        <div class="short_wrap">
            <a href="{{url('admin/role/create')}}"><i class="fa fa-plus"></i>添加角色</a>
            <a href="{{url('admin/role')}}"><i class="fa fa-recycle"></i>角色列表</a>
        </div>
    </div>
</div>
<!--结果集标题与导航组件 结束-->

<div class="result_wrap">
    <form action="{{url('admin/role')}}" method="post" name="roleForm" id="roleForm"  onsubmit="return checkForm('#roleForm')">
        {{csrf_field()}}
        <table class="add_tab">
            <tbody>

            <tr>
                <th><i class="require">*</i> 角色标识：</th>
                <td>
                    <input type="text" class="lg" name="name" value="{{old('name')}}">
                </td>
            </tr>
            <tr>
                <th><i class="require">*</i> 角色名称：</th>
                <td>
                    <input type="text" class="lg" name="display_name" value="{{old('display_name')}}">
                </td>
            </tr>
            <tr>
                <th>角色描述：</th>
                <td>
                    <input type="text" class="lg" name="description" value="{{old('description')}}">
                </td>
            </tr>

            <tr>
                <th></th>
                <td>
                    <input type="submit" value="提交">
                    <input type="button" class="back" onclick="history.go(-1)" value="返回">
                </td>
            </tr>
            </tbody>
        </table>
    </form>
</div>

@endsection
